# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-cjson
_pkgname=python-cjson
pkgver=1.2.1
pkgrel=3
pkgdesc='Fast JSON encoder/decoder for Python.'
url='https://pypi.org/project/cjson/#files'
arch=('x86_64' 'aarch64')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('dd998d1a77c4ac2f48316a66bb10741860a1ed7b8f54431bd72f949a4070284fa5040ed51c3030f7ad9fed4d76e12112206d32acf204800010c8b79b1665d684')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

